import { http } from '@/utils/http/axios';

/**
 * @description: 模板列表
 */
export function codeTemplatePage(params) {
  return http.request({
    url: '/moss-cloud-plugins/plugins/codeTemplate/page',
    method: 'POST',
    data: params,
  });
}

/**
 * @description: 保存模板
 */
export function saveCodeTemplate(params) {
  return http.request({
    url: '/moss-cloud-plugins/plugins/codeTemplate/save',
    method: 'POST',
    data: params,
  }, {
    isTransformResponse: false,
  });
}

/**
 * @description: 修改模板
 */
export function updateCodeTemplate(params) {
  return http.request({
    url: '/moss-cloud-plugins/plugins/codeTemplate/update',
    method: 'POST',
    data: params,
  }, {
    isTransformResponse: false,
  });
}

/**
 * @description: 删除模板
 */
export function removeCodeTemplate(params) {
  return http.request({
    url: '/moss-cloud-plugins/plugins/codeTemplate/remove',
    method: 'POST',
    data: params,
  }, {
    isTransformResponse: false,
  });
}

/**
 * @description: 模板详情
 */
export function detail(params) {
  return http.request({
    url: '/moss-cloud-plugins/plugins/codeTemplate/detail',
    method: 'POST',
    data: params,
  });
}